#define TREE

typedef struct NODE Node;

#ifndef SEMANTIC

#include "semantic_utils.h"

#endif

struct NODE {
    int elem;
    int lineno;
    struct NODE *ch[16];
    struct NODE *pa;
    int cnt;
    int intval;
    float floatval;
    char* strval;

    /* extern field record attributes of node */
    SNode* snode;
};


Node* createNode(int elem, int lineno);
Node* createLeaf(int elem, int lineno, char *text);
void printTree(Node *nd, int level);
